package cn.edu.abc.wangzi.ui;
/*
 *  项目名：Wangzi
 *  包名：cn.edu.abc.wangzi.ui
 *  创建者：SKFsky
 *  创建时间：2017/8/18 23:48
 *  描述:   Activity基类
 */

import android.os.Bundle;
import android.support.v4.text.TextUtilsCompat;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;


public class BaseActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //getActionBar().setElevation(0);//!!!
        //getActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setElevation(0);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()){
          case android.R.id.home:
              finish();
              break;
      }
        return super.onOptionsItemSelected(item);
    }
}
